from page.page_back_login import BackLoginPage
from page.page_loan_review import LoanReviewPage
from tools import DriverTools


class TestLoanReview(object):
    def setup_method(self):
        driver = DriverTools.get_driver()
        driver.get("http://121.43.169.97:8082/")
        self.back_login = BackLoginPage(driver)
        self.loan = LoanReviewPage(driver)

    def teardown_method(self):
        DriverTools.quit_driver()

    def test01_loan_review_success(self):
        self.back_login.back_login("admin", "HM_2023_test")
        self.loan.menu_manager()
        self.loan.limit_review_page("18683060005")
        self.loan.review_operate("测试", "通过", "8888")
        self.loan.get_shot("review_success.png")
